//
//  NoMoreView.m
//  PHMall
//
//  Created by admin on 2018/1/11.
//  Copyright © 2018年 admin. All rights reserved.
//

#import "NoMoreView.h"

@implementation NoMoreView

-(instancetype)init{
    if (self=[super init]) {
        self.title=[[UILabel alloc] init];
        self.Lline=[[UIView alloc]init];
        self.Rline=[[UIView alloc]init];
        
        [self addSubview:self.title];
        self.title.text=Localized(@"到底了");
        self.title.textColor=[UIColor colorWithHexString:@"#adadad"];
        self.title.font=[UIFont systemFontOfSize:13];
   
        
        [self addSubview:self.Lline];
        self.Lline.backgroundColor=[UIColor colorWithHexString:@"#adadad"];
        [self addSubview:self.Rline];
        self.Rline.backgroundColor=[UIColor colorWithHexString:@"#adadad"];
    }
    return self;
}
-(void)layoutSubviews{
    [super layoutSubviews];
    CGSize superSize = self.frame.size;
    
    if (CGSizeEqualToSize(superSize, CGSizeZero)) {
        return;
    }
    
    [self.title mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self).offset(0);
        make.centerX.equalTo(self);
        make.height.offset(30);
    }];
    [self.Lline mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.title);
        make.width.offset(40);
        make.height.offset(1);
        make.right.equalTo(self.title.mas_left).offset(-10);
    }];
    [self.Rline mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.title);
        make.width.offset(40);
        make.height.offset(1);
        make.left.equalTo(self.title.mas_right).offset(10);
    }];
}


@end
